<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="./jquery.min.js"></script>
    <title>js</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }

        ul {
            list-style: none;
            display: flex;
            background-color: #f2f2f2;
            height: 50px;
            align-items: center;
            justify-content: space-around;
            border-bottom: #F40 1px solid;
        }

        li {
            display: block;
            color: #666;
            flex: 1;
            cursor: pointer;
            height: 50px;
            text-align: center;
            line-height: 50px;
        }

        .tab {
            height: 500px;
            width: 500px;
            border: 1px solid #ccc;
            margin: 10px auto;
        }

        .current {
            background-color: #F40;
            color: #fff;
        }

        .item {
            display: none;
        }
    </style>
</head>

<body>
    <div class="tab">
        <div class="header">
            <ul>
                <li class="current">商品模块</li>
                <li>评价模块</li>
                <li>售后模块</li>
                <li>商品详情</li>
                <li>售后模块</li>
            </ul>
        </div>
        <div class="body">
            <div class="item" style="display: block;">商品模块</div>
            <div class="item">评价模块</div>
            <div class="item">售后模块</div>
            <div class="item">商品详情</div>
            <div class="item">售后模块</div>
        </div>
    </div>
    <script>
        $(function () {
            $('ul li').click(function () {
                let index = $(this).index();
                $(this).addClass('current').siblings().removeClass('current');
                $('.body div').eq(index).show().siblings().hide();
            })
        })
    </script>
</body>

</html>